export const permission = {
    inserted(el,bindings,vnode){
        let permissionName = bindings.value
        let p = vnode.context.$store.state.permissionList
        let menuname = vnode.context.menuname||vnode.context.$vnode.context.menuname
        let b = p.some(item => {
            if(item[menuname] && item[menuname]['permission'][permissionName]) return true
        })
        !b&&el.parentNode.removeChild(el)
       
    }
}